﻿using Code;
using github.heerheer.card2.UI.Infos;
using github.heerheer.card2.UI.Views;
using HeerCards.Helper;
using Panuon.UI.Silver;
using System.Threading.Tasks;
using System.Windows;

namespace github.heerheer.card2.UI
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public static MainWindow mainWindow = null;

        public MainWindow()
        {
            InitializeComponent();
            var ps = new ProCodeSaver();

            if (AppMain.VipInfo == null)
            {
                AppMain.VipInfo = new HeerCards.Info.VIPInfo();
            }
            if (AppMain.VipInfo.isVIP) this.Title = this.Title + " 高级版已激活";
            mainWindow = this;
        }

        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            mainWindow = null;
        }

        private void Button_Home(object sender,RoutedEventArgs e)
        {
            this.ContentCtrl.Content = new HomeView();
        }
    }
}